<?php

namespace App\Ship\Criterias;

use App\Ship\Parents\Criterias\Criteria;
use Prettus\Repository\Contracts\RepositoryInterface as PrettusRepositoryInterface;

class Where extends Criteria
{
    protected $column;
    protected $operator;
    protected $value;

    public function __construct($column, $operator, $value)
    {
        $this->column = $column;
        $this->operator = $operator;
        $this->value = $value;
    }


    public function apply($model, PrettusRepositoryInterface $repository)
    {
        return $model->where($this->column, $this->operator, $this->value);
    }
}
